package com.platform.service.impl;

import com.google.common.collect.Lists;
import com.platform.dto.OrderExcelDTO;
import com.platform.dto.OrderGoodsReturnDTO;
import com.platform.entity.OrderEntity;
import com.platform.entity.UserFreezeAccountEntity;
import com.platform.entity.UserTransactionRecordEntity;
import com.platform.service.*;
import com.platform.utils.DateUtils;
import com.platform.utils.R;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.platform.dao.OrderGoodsDao;
import com.platform.entity.OrderGoodsEntity;


@Service("orderGoodsService")
public class OrderGoodsServiceImpl implements OrderGoodsService {
	@Autowired
	private OrderGoodsDao orderGoodsDao;

	@Autowired
	private OrderService orderService;
	@Autowired
	private UserFreezeAccountService userFreezeAccountService;

	@Autowired
	private UserService userService;

	@Autowired
	private UserTransactionRecordService userTransactionRecordService;
	
	@Override
	public OrderGoodsEntity queryObject(Integer id){
		return orderGoodsDao.queryObject(id);
	}
	
	@Override
	public List<OrderGoodsEntity> queryList(Map<String, Object> map){
		return orderGoodsDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return orderGoodsDao.queryTotal(map);
	}
	
	@Override
	public void save(OrderGoodsEntity orderGoods){
		orderGoodsDao.save(orderGoods);
	}
	
	@Override
	public void update(OrderGoodsEntity orderGoods){
		orderGoodsDao.update(orderGoods);
	}
	
	@Override
	public void delete(Integer id){
		orderGoodsDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		orderGoodsDao.deleteBatch(ids);
	}

	@Override
	public List<OrderExcelDTO> export(Map<String, Object> map) {
		return orderGoodsDao.export(map);
	}


	@Override
	public void updateReturn(Integer id) {
		orderGoodsDao.updateReturn(id);
	}
}
